#include"thread_pool.hpp"
#include<time.h>
#include<random>

int main()
{
    srand((unsigned)time(nullptr));
    while(1)
    {
        sleep(1);
        Task t(rand()%20+1,rand()%10+1,"+-*/%"[rand()%5]);
        //GetInstance 存在被多个线程重入的安全问题
        ThreadPool<Task>::GetInstance()->PushTask(t);
        cout << ThreadPool<Task>::GetInstance()<<endl;
    }
    return 0;
}